import Request from '@/utils/request'
import type { VideoParams } from '@/types/video'

/**
 * 获取视频
 */
export const getVideoInfo = (params: any) => {
  return Request.get<VideoParams[]>('/admin/getvideo', {
    params
  })
}

/**
 * 审核视频
 */
export const checkVideo = (data: VideoParams) => {
  return Request.put<null>('/admin/checkvideo', data)
}

/**
 * 删除视频
 */
export const delVideo = (id: number) => {
  return Request.delete<null>(`/video/video/${id}`)
}
